<template>
    <div class="nodata flex col flexCenter" v-if="isShow">
        <img src="./../../../images/noContent.png" alt="">
        <p class="fontcolor">{{title}}</p>
        <div @click="toNext">
            去逛逛
        </div>
    </div>
</template>
<script>
export default {
    name:'noContent',
    props:{
        title:{
            type:String,
            default:"购物车中还没有添加商品，赶紧去选购吧~~"
        },
        isShow:{
            type:Boolean,
            default: false
        }
    },
    methods:{
        toNext(){
            this.$router.push({
                path:'/login'
            })
        }
    }
}
</script>
<style scoped lang="less">
.nodata {
    font-size: 1.8rem;
    position: relative;
    width: 100%;
    height: 29rem;
    clear: both;
    .fontcolor {
        color: #c8c8c8;
    }
    img {
        width: 20%;
        margin-top:5rem;
        margin-bottom:3rem;
    }
    &>p{
        width:60%;
        line-height:2rem;
        font-size:1.8rem;
    }
    &>div{
        padding:0.4rem 5rem;
        border-radius: 3rem;
        margin-top:2rem;
        margin-bottom:1.5rem;
        font-weight:bold;
        font-size:1.6rem;
        color:#ec2424;
        border:1px solid #ec2424;
    }
}
</style>
